package owg.util.editor2d.entity;
/**Must be implemented by all objects that you should be able to rotate in the Editor2D.
 * Angles are internally expressed in radians, but may be displayed as degrees to the user of the editor.<br/><br/>
 * As a general contract, rotation is <b>counter-clockwise</b>. An object's local X axis points to the <i>right</i>(east),
 * and the object's local Y axis points <i>down</i>(south) when the rotation is 0, 
 * e.g. the local basis is equal to the global basis when there is no rotation.<br/><br/>
 * For objects that supports non-uniform scaling, the x-scale parameter should always scale an object along its local x axis,
 * and the y-scale should scale along the local y axis.
 * */
public interface Rotateable2D extends Placeable2D {
    /**Get the object's angle, in radians.
     * @see Rotateable2D*/
    public float getAngle();
    /**Set the object's angle, in radians.
     * <br/><br/>
     * This is a shorthand for {@link #setAngle(float, boolean)} with tentative set to false.*/
    public default void setAngle(float newAngle)
    {
    	setAngle(newAngle, false);
    }
    /**Set the object's angle, in radians.
     * <br/><br/>
     * The operation may be "tentative", meaning that the user is transforming the object in the editor and that the scale will change in the near future.
     * The implementation may choose to omit certain calculations for tentative transformations. 
     * This will always be called with tentative set to false when the user completes or cancels the operation. 
     * @see Rotateable2D*/
    public void setAngle(float newAngle, boolean tentative);
}
